package _2021;

import java.util.Scanner;

/**
 * @author ShadowLim
 * @create 2022-03-29-17:57
 */

public class 时间显示 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        n /= 1000;  // ms --> s
        long h = (n % (3600 * 24)) / 3600;
        long m = (n % 3600) / 60;
        long s = n % 60;
        System.out.printf("%02d:%02d:%02d",h, m, s);
    }
}
